package com.ebid.templates.twenty;

import com.ebid.templates.utils.ParameterUtils;

import java.text.MessageFormat;

public class TenderBulletin {

    public static String tenderBulletion = "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n"+
            "<tenderBulletin> \n" +
            "    <tenderBulletinCode>{0}</tenderBulletinCode>\n" +
            "    <unifiedDealCodes>{1}</unifiedDealCodes>\n" +
            "    <tenderProjectCode>{2}</tenderProjectCode>\n" +
            "    <bidSectionCodes>{3}</bidSectionCodes>\n" +
            "    <bulletinName>{4}</bulletinName>\n" +
            "    <bulletinContent>{5}</bulletinContent>\n" +
            "    <bulletinIssueTime>{6}</bulletinIssueTime>\n" +
            "    <bulletinNature>{7}</bulletinNature>\n" +
            "    <bulletinType>{8}</bulletinType>\n" +
            "    <tenderDocGetStartTime>{9}</tenderDocGetStartTime>\n" +
            "    <tenderDocGetMethod>{10}</tenderDocGetMethod>\n" +
            "    <tenderDocDeadLine>{12}</tenderDocDeadLine>\n" +
            "    <bidDocReferEndTime>{12}</bidDocReferEndTime>\n" +
            "    <bidDocReferMethod>{13}</bidDocReferMethod>\n" +
            "    <bidOpenTime>{14}</bidOpenTime>\n" +
            "    <docPrice>{15}</docPrice>\n" +
            "    <docPriceCurrency>{16}</docPriceCurrency>\n" +
            "    <docPriceUnit>{17}</docPriceUnit>\n" +
            "    <syndicatedFlag>{18}</syndicatedFlag>\n" +
            "    <tenderMode>{19}</tenderMode>\n" +
            "    <bulletinMedia>{20}</bulletinMedia>\n" +
            "    <url>{21}</url>\n" +
            "    <bulletinEndTime>{22}</bulletinEndTime>\n" +
            "    <bulletinDuty>{23}</bulletinDuty>\n" +
            "    <bulletinDutyCodeType>{24}</bulletinDutyCodeType>\n" +
            "    <bulletinDutyCode>{25}</bulletinDutyCode>\n" +
            "    <bulletinMedia>{26}</bulletinMedia>\n" +
            "    <URL>{27}</URL>\n" +
            "    <examinerName>{28}</examinerName>\n" +
            "    <examinerCodeType>{29}</examinerCodeType>\n" +
            "    <examinerCode>{30}</examinerCode>\n" +
            "    <attachmentCode>{31}</attachmentCode>\n" +
            "    <version>{32}</version>\n" +
            "    <isOpen>{33}</isOpen>\n" +
            "    <openType>{34}</openType>\n" +
            "    <bulletinDuty>{35}</bulletinDuty>\n" +
            "    <platFormCode>{36}</platFormCode>\n" +
            "    <pubServicePlatCode>{37}</pubServicePlatCode>\n" +
            "    <verifyTime>{38}</verifyTime>\n" +
            "</tenderBulletin>";

    public static void setTenderBulletion(String tenderBulletion,String s0,String s1,String s2,String s3,String s4,String s5,String s6,String s7,String s8,String s9,String s10
            ,String s11,String s12,String s13,String s14,String s15,String s16,String s17,String s18,String s19,String s20
            ,String s21,String s22,String s23,String s24,String s25,String s26,String s27,String s28,String s29,String s30
            ,String s31,String s32,String s33,String s34,String s35,String s36,String s37,String s38) {
        TenderBulletin.tenderBulletion = MessageFormat.format(tenderBulletion,s0,s1,s2,s3,s4,s5,s6,s7,s8,s9,s10,
                s11,s12,s13,s14,s15,s16,s17,s18,s19,s20,s21,s22,s23,s24,s25,s26,s27,s28,s29,s30,
                s31,s32,s33,s34,s35,s36,s37,s38);
    }

    public static void setTenderBulletion(){
        setTenderBulletion(tenderBulletion, ParameterUtils.get("tenderBulletinCode"),
                                            ParameterUtils.get("unifiedDealCodes"),
                                            ParameterUtils.get("tenderProjectCode"),
                                            ParameterUtils.get("bidSectionCodes"),
                                            ParameterUtils.get("bulletinName"),
                                            ParameterUtils.get("bulletinContent"),
                                            ParameterUtils.get("bulletinIssueTime"),
                                            ParameterUtils.get("bulletinNature"),
                                            ParameterUtils.get("bulletinType"),
                                            ParameterUtils.get("tenderDocGetStartTime"),
                                            ParameterUtils.get("tenderDocGetMethod"),
                                            ParameterUtils.get("tenderDocDeadLine"),
                                            ParameterUtils.get("bidDocReferEndTime"),
                                            ParameterUtils.get("bidDocReferMethod"),
                                            ParameterUtils.get("bidOpenTime"),
                                            ParameterUtils.get("docPrice"),
                                            ParameterUtils.get("docPriceCurrency"),
                                            ParameterUtils.get("docPriceUnit"),
                                            ParameterUtils.get("syndicatedFlag"),
                                            ParameterUtils.get("tenderMode"),
                                            ParameterUtils.get("bulletinMedia"),
                                            ParameterUtils.get("url"),
                                            ParameterUtils.get("bulletinEndTime"),
                                            ParameterUtils.get("bulletinDuty"),
                                            ParameterUtils.get("bulletinDutyCodeType"),
                                            ParameterUtils.get("bulletinDutyCode"),
                                            ParameterUtils.get("bulletinMedia"),
                                            ParameterUtils.get("URL"),
                                            ParameterUtils.get("examinerName"),
                                            ParameterUtils.get("examinerCodeType"),
                                            ParameterUtils.get("examinerCode"),
                                            ParameterUtils.get("attachmentCode"),
                                            ParameterUtils.get("version"),
                                            ParameterUtils.get("isOpen"),
                                            ParameterUtils.get("openType"),
                                            ParameterUtils.get("bulletinDuty"),
                                            ParameterUtils.get("platFormCode"),
                                            ParameterUtils.get("pubServicePlatCode"),
                                            ParameterUtils.get("verifyTime")

                );
    }

//    public static void main(String[] args) {
//        setTenderBulletion();
//        System.out.println(tenderBulletion);
//    }
}
